package ru.osu.acm.testing.beans;

import ru.osu.acm.common.config.Config;

import javax.annotation.PostConstruct;
import javax.faces.context.FacesContext;

/**
 * User: aleksey
 * Date: May 2, 2009
 * Time: 10:16:38 PM
 */
public class StartupBean {
    private static Boolean initialized = false;

    public static void initialize() {
        if (!initialized) {
            String file1 = Thread.currentThread().getContextClassLoader().getResource("ru/osu/acm/common/config/" + FacesContext.getCurrentInstance().getExternalContext().getInitParameter("configFile")).getFile();
            Config.loadConfig(file1);
            initialized = true;
        }
    }
}
